package cn.miao.hrm.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @program: springcloud-hrm
 * @description:
 * @author: MiaoWei
 * @create: 2021-12-02 20:39
 **/
@NoArgsConstructor
@Data
public class RegisterUserDto {

    /**
     * 电话
     */
    @Pattern(regexp = "^(?:(?:\\+|00)86)?1\\d{10}$",message = "请输入正确的手机号码规则!")
    private String mobile;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    private String password;
    /**
     * 短信代码
     */
    @NotBlank(message = "短信校验码为空,请点击发送短信!")
    private String smsCode;
    /**
     * 注册通道
     */
    @NotNull(message = "非法请求")
    private Integer regChannel;
}
